<script setup>
  import mapBasic from './map_basic/index.vue';
  import mapBg from './map_bg/index.vue';
  import { onMounted, reactive, ref, computed, watch, nextTick, inject } from 'vue';

  defineOptions({name: ''});
  const props = defineProps({})
  const emits = defineEmits(['on-ok']);
  const tab = ref(1);
  const routerName = inject('routerName');
  onMounted(() => {});

  // 子组件暴露
  defineExpose({});

</script>

<template>
  <div style="height: 100%;width: 100%;position: relative;" v-if="routerName === 'echarts'">
    <el-row class="mb-4" style="position: absolute;bottom: 0;left: 0;z-index: 10;">
      <el-button type="primary" @click="tab = 1">1</el-button>
      <el-button type="primary" @click="tab = 2">2</el-button>
    </el-row>
    <mapBasic v-if="tab === 1"></mapBasic>
    <mapBg v-if="tab === 2"></mapBg>
  </div>
</template>

<style lang="less" scoped>

</style>
